package com.emin.platform.subjectcenter.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 用于调用生产链相关服务
 *
 * @author Jack
 * @version V1.0
 * @Title:
 * @Description: 用于调用生产链相关服务
 * @date 2017/10/26 16:21
 */
@FeignClient(value = "zuul")
public interface ChainService {
    @RequestMapping(value = "/api-eco/eco/createChain", method = RequestMethod.POST)
    String createChain(@RequestParam(value = "ecmId") Long ecmId);

    @RequestMapping(value = "/api-eco/eco/createNode", method = RequestMethod.POST)
    String createNode(@RequestParam(value = "chainId") Long chainId, @RequestParam(value =
            "ecmId") Long ecmId, @RequestParam(value = "parentNodeId") Long parentNodeId);


    @RequestMapping(value = "/api-eco/eco/{chainId}/chainNodes", method = RequestMethod.GET)
    String chainNodes(@RequestParam(value = "chainId") Long chainId, @RequestParam(value =
            "needDeep") Boolean needDeep);


    @RequestMapping(value = "/api-eco/eco/{ecmId}/mainChain", method = RequestMethod.GET)
    String mainChain(@RequestParam(value = "ecmId") Long ecmId);

}
